<admintpl file="headerEx" />
<title>{:L('ADMIN_PLUGIN_INDEX')}</title>
<!--responsive table-->
<link href="__PUBLIC__/TciocEx/css/table-responsive.css" rel="stylesheet" />
<link href="__PUBLIC__/js/artDialog/skins/default.css" rel="stylesheet" />
</head>

<!-- Placed js at the end of the document so the pages load faster -->
<body class="sticky-header">
<section>
	<!-- main content start-->
	<div class="full-content" >
		<!--body wrapper start-->
		<div class="wrapper">
			<div class="row">
				<div class="col-sm-12">
					<section class="panel">
						<header class="panel-heading custom-tab turquoise-tab">
							<ul class="nav nav-tabs">
								<li ><a href="{:U('plugin/index')}"><i class="fa fa-list-ul"></i>{:L('ADMIN_PLUGIN_INDEX')}</a></li>
								<li class="active"><a><i class="fa fa-cog"></i>{:L('ADMIN_PLUGIN_SETTING')}</a></li>
							</ul>
						</header>
						<div class="panel-body">

							<section id="no-more-tables">
								<form method="post" class="form-horizontal js-ajax-form" action="{:U('plugin/setting_post')}">
									<empty name="custom_config">
										<foreach name="data['config']" item="form">
											<div class="control-group">
												<label class="control-label" for="{$key}">
													{$form.title|default=''}
												</label>
												<switch name="form.type">
													<case value="text">
														<div class="controls">
															<input type="text" name="config[{$key}]" class="text input-large" value="{$form.value}" id="{$key}">
															<present name="form.tip">
																<span class="help-block">{$form.tip}</span>
															</present>
														</div>
													</case>
													<case value="password">
														<div class="controls">
															<input type="password" name="config[{$key}]" class="text input-large" value="{$form.value}" id="{$key}">
															<present name="form.tip">
																<span class="help-block">{$form.tip}</span>
															</present>
														</div>
													</case>
													<case value="hidden">
														<input type="hidden" name="config[{$key}]" value="{$form.value}">
													</case>
													<case value="radio">
														<div class="controls">
															<foreach name="form.options" item="opt" key="opt_k">
																<label class="radio inline">
																	<php>$radio_checked=$opt_k==$form['value']?"checked":"";</php>
																	<input type="radio" name="config[{$key}]" value="{$opt_k}" {$radio_checked}>{$opt}
																</label>
															</foreach>
															<present name="form.tip">
																<span class="help-block">{$form.tip}</span>
															</present>
														</div>
													</case>
													<case value="checkbox">
														<div class="controls">
															<foreach name="form.options" item="opt" key="opt_k">
																<label class="checkbox inline">
																	<php>
																		is_null($form["value"]) && $form["value"] = array();
																	</php>
																	<input type="checkbox" name="config[{$key}][]" value="{$opt_k}" <in name="opt_k" value="$form.value"> checked</in>>{$opt}
																</label>
															</foreach>
															<present name="form.tip">
																<span class="help-block">{$form.tip}</span>
															</present>
														</div>
													</case>
													<case value="select">
														<div class="controls">
															<select name="config[{$key}]" id="{$key}">
																<foreach name="form.options" item="opt" key="opt_k">
																	<option value="{$opt_k}" <eq name="form.value" value="$opt_k"> selected</eq>>{$opt}</option>
																</foreach>
															</select>
															<present name="form.tip">
																<span class="help-block">{$form.tip}</span>
															</present>
														</div>
													</case>
													<case value="textarea">
														<div class="controls">
															<textarea name="config[{$key}]" id="{$key}">{$form.value}</textarea>
															<present name="form.tip">
																<span class="help-block">{$form.tip}</span>
															</present>
														</div>
													</case>
												</switch>
											</div>
										</foreach>
										<else />
										<present name="custom_config">
											{$custom_config}
										</present>
									</empty>
									<input type="hidden" name="id" value="{:I('id')}" readonly>
									<div class="form-actions">
										<button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
										<a class="btn" href="javascript:history.back(-1);">返回</a>
									</div>
								</form>
							</section>

						</div>
					</section>
				</div>
			</div>
		</div>

	</div>
	</div>
	</div>
	<!--body wrapper end-->

	<!--footer section start-->
	<footer>
		<admintpl file="copyright" />
	</footer>
	<!--footer section end-->

	</div>
	<!-- main content end-->
</section>

<script src="__PUBLIC__/TciocEx/js/jquery-1.10.2.min.js"></script>
<script src="__PUBLIC__/js/wind.js"></script>
<script src="__PUBLIC__/js/common.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="__PUBLIC__/simpleboot/bootstrap/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery-migrate-1.2.1.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/modernizr.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery.nicescroll.js"></script>
<script src="__PUBLIC__/js/ajaxForm.js"></script>

<script type="text/javascript" src="__PUBLIC__/TciocEx/js/jquery.validate.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/validation-localization/messages_zh.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/scripts.js"></script>
<script src="__PUBLIC__/TciocEx/js/validation-init.js"></script>

</body>
</html>